﻿using Licogi10.Data;
using Licogi10.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_NguoiDung_QLNguoiDung : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!Page.IsPostBack)
        {
            Bind_Data();
        }
    }


    protected void Bind_Data()
    {
        try
        {
            TList<NguoiDung> Tlist_NguoiDung = DataRepository.NguoiDungProvider.GetAll();
            gridCatalog.DataSource = Tlist_NguoiDung;
            gridCatalog.DataBind();
        }
        catch (Exception)
        {
        }
    }
    protected void cmdSave_Click(object sender, ImageClickEventArgs e)
    {
    }
    protected void cmdReset_Click(object sender, ImageClickEventArgs e)
    {
    }
    protected void gridCatalog_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes["onmouseover"] = "this.style.cursor='hand';this.style.backgroundColor='WhiteSmoke';";
            e.Row.Attributes["onmouseout"] = "this.style.backgroundColor='White';";

            LinkButton l = (LinkButton)e.Row.FindControl("cmdDelete");
            l.Attributes.Add("onclick", "javascript:return " + "confirm('Bạn chắc chắn muốn xóa thông tin này?');");
        }
    }

    protected void gridCatalog_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Select")
        {
        }
    }
    protected void gridCatalog_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
    }
}